package com.itheima.stock.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.stock.pojo.entity.SysPermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.stock.pojo.vo.MenusAndChildrenVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限表（菜单） Mapper 接口
 * </p>
 *
 * @author 哈纳桑
 * @since 2024-06-02
 */
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    /**
     * 根据用户id获取权限集合
     * @param id
     * @return
     */
    List<String> selectMenuPermsByUserId(Long id);

    List<SysPermission> selectChildren(Long pid);


    List<MenusAndChildrenVo> getMenuList(@Param("pid") Long pid , @Param("type") Integer type);
}
